package kill

import (
	"fmt"
	"github.com/gin-gonic/gin"
)

func GetKillIndex(context *gin.Context) {
	context.HTML(200, "demo01/index.html", nil)
}

type User struct {
	//注意绑定字段要大写
	Username string `form:"username"`
	Age      string `form:"age"`
}

func BandingForm(context *gin.Context) {
	var user User
	err := context.ShouldBind(&user)
	fmt.Println(user)
	if err != nil {
		context.String(404, "绑定失败")
	} else {
		context.String(200, "绑定成功")
	}

}
